import request from '@/utils/request'
// -------- 阿米巴预算后台 --------

// 分页查询预算科目
export const getBudgetSubjectListApi = (params) =>{
    return request({
        url: `/tool/budgetSubject/list`,
        method: "get",
        params
    })
}

// 修改预算科目
export const editBudgetSubjectApi = (data) =>{
    return request({
        url: `/tool/budgetSubject/edit`,
        method: "put",
        data
    })
}

// 添加预算科目
export const addBudgetSubjectApi = (data) =>{
    return request({
        url: `/tool/budgetSubject/add`,
        method: "post",
        data
    })
}

// 删除预算科目 /tool/budgetUnit/remove/{id}
export const removeBudgetSubjectApi = (id) =>{
    return request({
        url: `/tool/budgetSubject/remove/${id}`,
        method: "DELETE",
    })
}

// 分页查询指标名称
export const getBudgetTargetListApi = (params) =>{
    return request({
        url: `/tool/budgetTarget/list`,
        method: "get",
        params
    })
}

// 添加指标名称
export const addBudgetTargetApi = (data) =>{
    return request({
        url: `/tool/budgetTarget/add`,
        method: "post",
        data
    })
}

// 修改指标名称
export const editBudgetTargetApi = (data) =>{
    return request({
        url: `/tool/budgetTarget/edit`,
        method: "put",
        data
    })
}

// 删除指标名称 /tool/budgetTarget/remove/{id}
export const removeBudgetTargetApi = (id) =>{
    return request({
        url: `/tool/budgetTarget/remove/${id}`,
        method: "DELETE",
    })
}

// 获取阿米巴专户列表的接口 /tool/budgetService/listAccount
export const getbudgetServicelistAccountApi = (params) =>{
    return request({
        url: `/tool/budgetService/listAccount`,
        method: "get",
        params
    })
}

// 增加预算专户的余额 /tool/budgetService/addBalance
export const addBalanceBudgetServiceApi = (data) =>{
    return request({
        url: `/tool/budgetService/addBalance`,
        method: "put",
        data
    })
}

// 获取阿米巴专户赋值记录 /tool/budgetTrade/list
export const getBudgetTradeListApi = (params) =>{
    return request({
        url: `/tool/budgetTrade/list`,
        method: "get",
        params
    })
}
